package middle.ground.core.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Persist注解，应用于字段上，用于表明该字段在新增和更新时的动作
 *
 * @author jrl
 * @author jrl
 * @date 2020-12-01
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Documented
public @interface Persist {

	public static final String PERSIST = "persist";

	public static final String UNINSERTABLE = "unInsertable";

	public static final String UNUPDATABLE = "unUpdatable";

	/**
	 * 持久化类型，有一下几个值：
	 * persist：表明该字段可插入,可更新
	 * unInsertAble：表明该字段不可插入
	 * unUpdatable：表明该字段不可更新
	 *
	 * @return
	 */
	String[] value() default "persist";
}
